package com.santu.edu.supporter.biz.user.pojo.po;

import java.io.Serializable;
import java.util.Date;

import com.santu.edu.supporter.biz.user.pojo.dto.UserAddressDTO;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 
 * @TableName edu_supporter_user_address
 */
@Data
@Accessors(chain = true)
public class UserAddressPO implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 地址id
     */
    private String addressId;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 楼栋id
     */
    private String buildingsId;

    /**
     * 详细地址
     */
    private String addressInfo;

    /**
     * 收件人姓名
     */
    private String userName;

    /**
     * 收件人电话
     */
    private String phone;

    /**
     * 
     */
    private String gmtCreate;

    /**
     * 
     */
    private String gmtModified;

    private static final long serialVersionUID = 1L;


    public static UserAddressPO createItem(UserAddressDTO dto) {
        return new UserAddressPO()
                .setAddressId(dto.getAddressId())
                .setUserId(dto.getUserId())
                .setBuildingsId(dto.getBuildingsId())
                .setAddressInfo(dto.getAddressInfo())
                .setUserName(dto.getUserName())
                .setPhone(dto.getPhone());
    }
}